home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / unix / Makefile next >
Encoding:
Makefile  |  2004-12-15  |  745 b   |  44 lines

  1. CC     = gcc
  2. OPTFLAGS = -g -Os
  3. INCLUDES = -I. -I.. -I../libfat
  4. CFLAGS     = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
  5. LDFLAGS     = -s
  6.  
  7. SRCS     = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
  8. OBJS     = $(patsubst %.c,%.o,$(notdir $(SRCS)))
  9.  
  10. .SUFFIXES: .c .o .i .s .S
  11.  
  12. VPATH = .:..:../libfat
  13.  
  14. all: installer
  15.  
  16. tidy:
  17.     -rm -f *.o *.i *.s *.a .*.d
  18.  
  19. clean: tidy
  20.     -rm -f syslinux syslinux-nomtools
  21.  
  22. spotless: clean
  23.     -rm -f *~
  24.  
  25. installer: syslinux syslinux-nomtools
  26.  
  27. syslinux: $(OBJS)
  28.     $(CC) $(LDFLAGS) -o $@ $^
  29.  
  30. syslinux-nomtools: syslinux
  31.     ln -f $< $@
  32.  
  33. %.o: %.c
  34.     $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
  35. %.i: %.c
  36.     $(CC) $(CFLAGS) -E -o $@ $<
  37. %.s: %.c
  38.     $(CC) $(CFLAGS) -S -o $@ $<
  39.  
  40. -include .*.d
  41.  
  42.  
  43.  
  44.